#ifndef FASYS_LIBS_SUBSCRIBER_CHANNEL_SUBSCRIBTION_HPP
#define FASYS_LIBS_SUBSCRIBER_CHANNEL_SUBSCRIBTION_HPP

#include "types.hpp"

/// Удалиьт! не нужен

namespace fasys{ namespace subscriber{

  /**
   struct message_ordered_by_order
  : ordered_non_unique<
      tag<_order_>,
      composite_key<
        message_info,
        member<message_info, channel_id_t, &message_info::channel_id>,
        member<message_info, order_t, &message_info::order>,
        member<message_info, time_t, &message_info::create_time>,
        member<message_info, message_id_t, &message_info::message_id>
      >,
      composite_key_compare<
        std::less<channel_id_t>,
        std::greater<order_t>,
        std::greater<time_t>,
        std::greater<message_id_t>
      >
   >
{
};
  */
struct messages_less
{
  bool operator()( const message_notify& left, const message_notify& right ) const
  {
    if ( left.oreder > right.order ) return false;
    if ( left.oreder < right.order ) return true;

    if ( left.create_time > right.create_time ) return false;
    if ( left.create_time < right.create_time ) return true;

    if ( left.create_time > right.create_time ) return false;
    if ( left.create_time < right.create_time ) return true;
  };
};

struct channel_subscribtion
{
  channel_id_t channel_id;

  subscribtion(channel_id_t channel_id)
    : channel_id(channel_id)
  {
  }
};

}}

#endif